package com.java.pertar.verificationcode;

import cn.hutool.captcha.CaptchaUtil;
import cn.hutool.captcha.LineCaptcha;
import cn.hutool.core.lang.Console;

public class CapatorTest {

    public static void main(String[] args) {

        LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(200, 100);

//图形验证码写出，可以写出到文件，也可以写出到流
        lineCaptcha.write("d:/line.png");
        Console.log(lineCaptcha.getCode());
        System.out.println(lineCaptcha.verify("1234"));
    }
}
